import Vue from 'vue'
import App from './App'
import Vuex from 'vuex'
import MButton from '@/components/Button';
import Code from '@/components/Code';
// import Upload from '@/components/Upload/index.vue';
// import permision from "@/js_sdk/wa-permission/permission.js"
// var photol = permision.judgeIosPermission("photoLibrary")
// if (photol == false) {
// 	uni.showModal({
// 		title: '提示',
// 		content: '您已经关闭相册权限,去设置',
// 		success: function(res) {
// 			if (res.confirm) {
// 				plus.runtime.openURL("app-settings:");
// 			} else if (res.cancel) {
// 				uni.showToast({
// 					title:'您已取消',
// 					icon:'none'
// 				})
// 			}
// 		}
// 	});
// }

import houseInfo from "@/data/houseinfo/index.js"

uni.setStorageSync('houseInfo', JSON.stringify(houseInfo))

Vue.config.productionTip = false

App.mpType = 'app'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.component("MButton", MButton);
Vue.component("Code", Code);
// Vue.component("MUpload", Upload);
// 此处为演示vuex使用，非uView的功能部分
import store from '@/store';

// 进入页面的动画配置
Vue.prototype.animation = {
	type: 'zoom-fade-out',
	time: 300
}
// 引入uView提供的对vuex的简写法文件
// let vuexStore = require('@/store/$u.mixin.js');
// Vue.mixin(vuexStore);

// 引入uView对小程序分享的mixin封装
// let mpShare = require('uview-ui/libs/mixin/mpShare.js');
// Vue.mixin(mpShare)

const app = new Vue({
	store,
	...App
})

// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
// import httpInterceptor from '@/common/http.interceptor.js';
// Vue.use(httpInterceptor, app);

// 封装自定义提示框
import $mytip from 'common/utils/tip.js'
Vue.prototype.$mytip = $mytip

app.$mount()